package com.example.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CartItem {
    Product product;
    int count;
    double subtotal;

    public double getSubtotal() {
        this.subtotal = product.getShop_price() * count;
        return subtotal;
    }
}
